<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>{$title|raw}</title>
<meta name="keywords" content="{$rs.keyword|raw}" />
<meta name="description" content="{$rs.description|raw}" />
<link rel="shortcut icon" type="image/x-icon" href="{$siteRs.ico}" />
{include file="public/css" /}
<link rel="stylesheet" href="{:config('template.skin')}/owl.carousel/assets/owl.carousel.min.css">
</head>
<body>
{include file="public/head" /}
<!--面包屑 开始-->
<div class="w-100 bg-light py-3 d-none d-sm-block">
    <div class="container">
        <div class="row">
            <div class="col-md-8 pt-1">
                <a href="{$home_path}" class="mr-2">{:lang('v_home')}</a> <i class="fa fa-angle-right"></i>
                <a href="<?php the_list_url($controller); ?>" class="ml-2">{:lang('v_product')}</a>
                {volist name="crumb" id="listnavRs"}
                    <i class="fa fa-angle-right ml-2 mr-2"></i><a href="{$listnavRs.url}">{$listnavRs.title}</a>
                {/volist}
            </div>
            <div class="col-md-4">
                <form name="form_search" id="form_search" method="get" action="<?php the_list_url($controller); ?>">
                    <div class="input-group">
                        <input type="text" class="form-control form-control-sm btn-rounded" name="keyword" id="keyword" value="{:input('keyword')}" placeholder="{:lang('v_keyword_tips')}...">
                        <span class="input-group-append"><button type="button" name="btn_search" id="btn_search" class="btn btn-sm btn-rounded px-3"><i class="fa fa-search"></i></button></span>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<!--面包屑 结束-->
<!--主体 开始-->
<div class="container mt-md-5 mt-sm-3">
    <div class="row">
        <!--内容 开始-->
        <div class="col-md-9 mb-sm-4">
            <div class="row">
                <!--更多图片-->
                <div class="col-md-6 mb-sm-3">
                    <div class="owl-carousel nav-dark mb-sm-2" data-plugin-options="{'items': 1, 'margin': 10, 'loop': false, 'nav': true, 'dots': false}" id="thumbGalleryDetail">
                        {foreach $morepics as $pic}
                            {php}$picArr = explode('@',$pic);{/php}
                            <img src="{$picArr[1]}" class="img-fluid rounded big" onerror="this.src='/skin/admin/img/nopic.png'">
                        {/foreach}
                    </div>
                    <div class="owl-carousel d-none d-sm-inline" id="thumbGalleryThumbs">
                        {foreach $morepics as $key=>$pic}
                            {php}$picArr = explode('@',$pic);{/php}
                            <img src="{$picArr[1]}" class="img-fluid rounded small" onerror="this.src='/skin/admin/img/nopic.png'">
                        {/foreach}
                    </div>
                </div>
                <!--产品详情-->
                <div class="col-md-6 mb-sm-3">
                    <h1 class="h5 line-height-180 font-weight-bold">{$rs.title}</h1>
                    {notempty name="rs.description"}
                        <div class="w-100">
                            <p class="text-muted">
                                {php}
                                    foreach (explode(PHP_EOL,$rs['description']) as $description){
                                        echo $description.'<br>';
                                    }
                                {/php}
                            </p>
                        </div>
                    {/notempty}
                    <!--询价-->
                    <div class="w-100 mt-sm-4">
                        <a href="{:url('feedback/consult',['tabledir'=>$controller,'id'=>$rs['id']])}" class="btn btn-rounded px-3 btn-success" data-target="#modal" data-toggle="modal"><i class="fa fa-comments mr-2"></i>{:lang('v_quick_quote')}</a>
                    </div>
                    <div class="w-100 mt-sm-5 mt-4">{include file="public/share" /}<p class="mt-3 text-muted"><i class="fa fa-eye"></i> {:lang('v_hits')}：{$rs.hits} {:lang('v_times')}</p></div>
                </div>
                <div class="col-md-12">
                    {if in_array('morecontents',$isdisplay_array)}
                        <ul class="nav nav-tabs">
                            <li class="nav-item active"><a class="nav-link" href="#tab1" data-toggle="tab">{:lang('v_content1')}</a></li>
                            <li class="nav-item"><a class="nav-link" href="#tab2" data-toggle="tab">{:lang('v_content2')}</a></li>
                            <li class="nav-item"><a class="nav-link" href="#tab3" data-toggle="tab">{:lang('v_content3')}</a></li>
                        </ul>
                        <div class="tab-content detail">
                            <div id="tab1" class="tab-pane active">{$rs.content1|raw}</div>
                            <div id="tab2" class="tab-pane">
                                {if in_array('attribute',$isdisplay_array)}
                                    <p class="my-3">
                                    {volist name="attribute" id="attRs"}
                                        {$attRs.title}：{:str_replace('|', ' | ', $attRs['attvalue'])}<br />
                                    {/volist}
                                    </p>
                                {/if}
                                {$rs.content2|raw}
                            </div>
                            <div id="tab3" class="tab-pane">{$rs.content3|raw}</div>
                        </div>
                    {else /}
                        <ul class="nav nav-tabs"></ul>
                        <div class="tab-content detail">{$rs.content1|raw}</div>
                    {/if}
                    <p class="mt-3 mb-2 ellipsis line-1">
                        {:lang('v_previous_page')}：
                        {empty name="preRs"}
                            {:lang('v_nodata')}
                        {else /}
                            <a href="<?php the_view_url($preRs['id'],$controller); ?>">
                                {$preRs.title|raw}
                            </a>
                        {/empty}
                    </p>
                    <p class="mb-0 ellipsis line-1">
                        {:lang('v_next_page')}：
                        {empty name="nextRs"}
                            {:lang('v_nodata')}
                        {else /}
                            <a href="<?php the_view_url($nextRs['id'],$controller); ?>">
                                {$nextRs.title|raw}
                            </a>
                        {/empty}
                    </p>
                </div>
            </div>
        </div>
        <!--内容 结束-->
        <!--侧边栏 开始-->
        <div class="col-md-3 d-none d-md-block">
            <div class="page-right">
                <!--分类 开始-->
                <h6 class="font-weight-bold mb-3"><i class="fa fa-dot-circle font-weight-light small"></i> {:lang('v_product_sort')}</h6>
                <ul class="nav nav-list flex-column">
                    <li><a class="{if empty($rs['sortid'])}active{/if}" href="<?php the_list_url($controller); ?>">{:lang('v_product_all')}</a></li>
                    {include file="public/side_sort" /}
                </ul>
                <!--分类 结束-->
            </div>
            <div class="page-right">
                <!--相关产品 开始-->
                <h6 class="font-weight-bold"><i class="fa fa-dot-circle font-weight-light small"></i> {:lang('v_product_related')}</h6>
                <hr>
                <ul class="aside-list mb-0 pl-0">
                    <?php $relatedProList = table_list($controller, $rs['sortid'], '*', $lang, 5, "$controller.sequence desc"); ?>
                    {volist name="relatedProList" id="relatedproRs"}
                        {if $relatedproRs['id'] <> $rs['id']}
                            <li class="clearfix">
                                <a href="<?php the_view_url($relatedproRs['id']); ?>">
                                    <img alt="{$relatedproRs.title}" width="60" class="float-left img-fluid rounded mr-2 mt-1" src="{$relatedproRs.thumb}" onerror="this.src='/skin/admin/img/nopic.png'">
                                    <span class="ellipsis line-3">{$relatedproRs.title}</span>
                                </a>
                            </li>
                        {/if}
                    {/volist}
                </ul>
                <!--相关产品 结束-->
            </div>
        </div>
        <!--侧边栏 结束-->
    </div>
</div>
{include file="public/foot" /}
<script type="text/javascript" src="{:config('template.skin')}/owl.carousel/owl.carousel.min.js"></script>
<script type="text/javascript" src="{:config('template.skin')}/js/gallery.js"></script>
</body>
</html>